python get last element of iterator

27

*_, last = iterator # for a better understanding check PEP 448
print(last)

Comments

Submit
0 Comments